package com.jly.edu.common.param;

import com.jly.edu.common.validated.SaveGroup;
import com.jly.edu.common.validated.UpdateGroup;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;


@Data
public class SysMenuParam {

    @NotNull(message = "id不能为空！",groups = {UpdateGroup.class})
    private Long id;
    private Long parentId;
    private String name;
    @NotBlank(message = "菜单名称不能为空！", groups = {SaveGroup.class,UpdateGroup.class})
    private String title;
    @NotNull(message = "状态码不能为空！",groups = {SaveGroup.class, UpdateGroup.class})
    private Integer status;
    /**
     * 菜单URL
     */

    private String path;

    /**
     * 授权(多个用逗号分隔，如：user:list,user:create)
     */
    @NotEmpty(message = "权限编码不能为空",groups = {SaveGroup.class, UpdateGroup.class})
    private String perms;

    private String component;

    /**
     * 类型     0：目录   1：菜单   2：按钮
     */
    @NotNull(message = "类型不能为空",groups = {SaveGroup.class, UpdateGroup.class})
    private Integer type;

    /**
     * 菜单图标
     */
    private String icon;

    /**
     * 排序
     */
    private Integer orderNum;

    private LocalDateTime createTime;

    private LocalDateTime updateTime;
}
